package com.hao.actor.logger;

import org.agilewiki.jactor.JAMailboxFactory;
import org.agilewiki.jactor.MailboxFactory;

public class JactorLogger {

	private MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(10);

	public void log(String msg) throws Exception {
		LoggerActor actor = new LoggerActor();
		actor.initialize(mailboxFactory.createMailbox());
		
		actor.setMsg(msg);
		
		ActorRequest.req.sendEvent(actor);
	}
}
